package com.infocollect.project.wx.interceptor;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WXPermissionConfig implements WebMvcConfigurer {
	@Bean
    public WXPermissionInterceptor securityInterceptor() {
        return new WXPermissionInterceptor();
    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
    	registry.addInterceptor(securityInterceptor())
//    		.excludePathPatterns("/static/*")
//            .excludePathPatterns("/error")
            .addPathPatterns("/wx/**","/wx/type/**");
    }
}
